#include <iostream>

struct student
{
    //函数也成为了结构体的一部分
    void show()
    {
        std::cout<<"ID:"<<id<<" "<<"姓名:"<<name<<std::endl;
    }
    void SetID(int Id)
    {
        id = Id;
    }
    char name[20];
    int id;
};

// typedef struct student stu;
using stu = struct student;



int main()
{
    stu s = {"zhangsan",1};
    s.SetID(10);
    s.show();
    return 0;
}